package com.dj.product.k2faas.view.datasource;

import com.dj.product.k2faas.entity.datasource.DataSource;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.Optional;

/**
 * Created by 丁建 on 2025/9/23 09:25
 *
 * @author 丁建
 */
interface DataSourceRepository extends PagingAndSortingRepository<DataSource, Long>, CrudRepository<DataSource, Long> {

    Optional<DataSource> findByName(String name);

    Page<DataSource> findAll(Specification<DataSource> spec, Pageable pageable);
}
